package com.lemurian.bankdata.dto;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.configuration.PropertiesConfiguration;

import com.lemurian.bankdata.lite.enums.UserActivityType;
import com.lemurian.bankdata.lite.logger.BankDataLogger;
import com.lemurian.bankdata.lite.utils.BankDataCommons;
import com.lemurian.entity.User;

public class LogHelper {
	
	private UserActivityType type;
    private User user;
    private Date startDate = new Date();
    private Date endDate = new Date();
    private String errorCode;
    private String errorMsg;
    private String sessionId;
    private String remarks;
    
    private List<Object> additionalParams = new ArrayList<Object>();
    
    private Character status = FAILED_ACTIVITY;
    public static final Character SUCCESS_ACTIVITY = 'Y';
    public static final Character FAILED_ACTIVITY = 'N';
    
    private BankDataLogger log = BankDataLogger.getLogger(LogHelper.class.getSimpleName());
    private PropertiesConfiguration config = BankDataCommons.getBankDataConfig();
    
    public LogHelper(User user, UserActivityType type) {
        this.user = user;
        this.type = type;
    }
    
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public List<Object> getAdditionalParams() {
		return additionalParams;
	}

	public void setAdditionalParams(List<Object> additionalParams) {
		this.additionalParams = additionalParams;
	}

	public BankDataLogger getLog() {
		return log;
	}

	public void setLog(BankDataLogger log) {
		this.log = log;
	}

	public PropertiesConfiguration getConfig() {
		return config;
	}

	public void setConfig(PropertiesConfiguration config) {
		this.config = config;
	}

	public Character getStatus() {
		return status;
	}

	public void setStatus(Character status) {
		this.status = status;
	}

	public UserActivityType getType() {
		return type;
	}

	public void setType(UserActivityType type) {
		this.type = type;
	}
	
}